package com.tbs.web.annotation;

import com.tbs.web.config.AuthConfig;
import com.tbs.web.config.TokenSetConfig;
import com.tbs.web.config.WebConfig;
import com.tbs.web.config.property.WebAuthProperty;
import com.tbs.web.config.property.WebProperty;
import com.tbs.web.result.aop.ResponseAjaxAspect;
import com.tbs.web.result.config.ResultConfig;
import com.tbs.web.result.config.property.ResultProperty;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Import;
import org.springframework.security.config.annotation.method.configuration.EnableMethodSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;

import java.lang.annotation.Retention;
import java.lang.annotation.Target;

/**
 * @author tongj
 */
@Target(java.lang.annotation.ElementType.TYPE)
@Retention(java.lang.annotation.RetentionPolicy.RUNTIME)
@Import({AuthConfig.class, TokenSetConfig.class, WebConfig.class, ResultConfig.class, ResponseAjaxAspect.class})
@EnableConfigurationProperties({WebProperty.class, WebAuthProperty.class, ResultProperty.class})
@EnableWebSecurity
@EnableMethodSecurity(prePostEnabled = true, proxyTargetClass = true)
public @interface EnableWebAuth {
}
